package com.cqc.service.impl;

import com.cqc.entity.User2EB;
import com.cqc.dao.db2.User2Mapper;
import com.cqc.service.User2Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.time.LocalDateTime;


/**
 * <p>
 * 服务实现类
 * </p>
 *
 * @author mike
 * @since 2023-09-25
 */
@Service
@Transactional(rollbackFor = Exception.class)
public class User2ServiceImpl extends ServiceImpl<User2Mapper, User2EB> implements User2Service {

    @Override
    public void addUser() {
        User2EB eb2 = new User2EB();
        eb2.setUsername("刘诗诗");
        eb2.setBirthday(LocalDateTime.now());
        eb2.setSex("1");
        eb2.setAddress("北京");

        baseMapper.insert(eb2);

        int b = 5 / 0;
    }
}
